import { createRouter, createWebHistory } from "vue-router";
import HomeView from "../views/HomeView.vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "home",
      component: () => import("@/views/home/home.vue"),
      meta: {
        title: "首页",
      },
      // 子
      children: [
        // 子站域名
        {
          path: "/SubstationName",
          name: "SubstationName",
          component: () => import("@/views/home/Substation/SubstationName.vue"),
          meta: {
            title: "子站域名",
          },
        },

        // 基本信息
        {
          path: "/userBasicinformation",
          name: "userBasicinformation",
          component: () => import("@/views/home/user/userBasicinformation.vue"),
          meta: {
            title: "基本信息",
          },
        },
        //营业执照上传
        {
          path: "/userLicense",
          name: "userLicense",
          component: () => import("@/views/home/user/userLicense.vue"),
          meta: {
            title: "营业执照上传",
          },
        },
        // 联系人
        {
          path: "/userContacts",
          name: "userContacts",
          component: () => import("@/views/home/user/userContacts.vue"),
          meta: {
            title: "联系人",
          },
        },
        // 资质证书上传
        {
          path: "/userCertificate",
          name: "userCertificate",
          component: () => import("@/views/home/user/userCertificate.vue"),
          meta: {
            title: "资质证书上传",
          },
        },

        // 商品管理
        {
          path: "/commodityList",
          name: "commodityList",
          component: () => import("@/views/home/commodity/commodityList.vue"),
          meta: {
            title: "商品管理列表",
          },
        },
        // 商品分类管理
        {
          path: "/commoditySort",
          name: "commoditySort",
          component: () => import("@/views/home/commodity/commoditySort.vue"),
          meta: {
            title: "商品分类管理",
          },
        },
        // 添加发布商品
        {
          path: "/commodityAdd",
          name: "commodityAdd",
          component: () => import("@/views/home/commodity/commodityAdd.vue"),
          meta: {
            title: "添加",
          },
        },
        // 添加分类
        {
          path: "/commoditySortAdd",
          name: "commoditySortAdd",
          component: () =>
            import("@/views/home/commodity/commoditySortAdd.vue"),
          meta: {
            title: "添加分类",
          },
        },
        // 商品置顶记录
        {
          path: "/commodityTop",
          name: "commodityTop",
          component: () => import("@/views/home/commodity/commodityTop.vue"),
          meta: {
            title: "商品置顶记录",
          },
        },

        // 采购管理
        {
          path: "/procureTab",
          name: "procureTab",
          component: () => import("@/views/home/procure/procureTab.vue"),
          meta: {
            title: "采购管理列表",
          },
        },
        // 采购单置顶记录
        {
          path: "/procureTopRecord",
          name: "procureTopRecord",
          component: () => import("@/views/home/procure/procureTopRecord.vue"),
          meta: {
            title: "采购单置顶记录",
          },
        },
        // 跳转详情
        {
          path: "/procureDetails",
          name: "procureDetails",
          component: () => import("@/views/home/procure/procureDetails.vue"),
          meta: {
            title: "采购管理列表详情",
          },
        },
        // 未发布未审核未报价详情
        {
          path: "/procureNo",
          name: "procureNo",
          component: () => import("@/views/home/procure/procureNo.vue"),
          meta: {
            title: "未发布未审核未报价详情",
          },
        },

        // 报价管理
        {
          path: "/quotationOrder",
          name: "quotationOrder",
          component: () => import("@/views/home/quotation/quotationOrder.vue"),
          meta: {
            title: "报价单",
          },
        },
        // 报价置顶记录
        {
          path: "/quotationTopof",
          name: "quotationTopof",
          component: () => import("@/views/home/quotation/quotationTopof.vue"),
          meta: {
            title: "报价置顶记录",
          },
        },
        // 报价单详情
        {
          path: "/quotationDetails",
          name: "quotationDetails",
          component: () =>
            import("@/views/home/quotation/quotationDetails.vue"),
          meta: {
            title: "报价单详情",
          },
        },
        // 未报价 再次报价 详情
        {
          path: "/quotationUnpriced",
          name: "quotationUnpriced",
          component: () =>
            import("@/views/home/quotation/quotationUnpriced.vue"),
          meta: {
            title: "报价单详情",
          },
        },

        //咨询管理
        {
          path: "/consultOne",
          name: "consultOne",
          component: () => import("@/views/home/consult/consultOne.vue"),
          meta: {
            title: "咨询单",
          },
        },
        // 咨询单置顶记录
        {
          path: "/consultTopping",
          name: "consultTopping",
          component: () => import("@/views/home/consult/consultTopping.vue"),
          meta: {
            title: "咨询单置顶记录",
          },
        },
        // 咨询单详情
        {
          path: "/consultDetail",
          name: "consultDetail",
          component: () => import("@/views/home/consult/consultDetail.vue"),
          meta: {
            title: "咨询单置顶记录",
          },
        },

        //意向管理
        {
          path: "/intentionManage",
          name: "intentionManage",
          component: () => import("@/views/home/intention/intentionManage.vue"),
          meta: {
            title: "意向单单列表",
          },
        },
        // 意向单详情
        {
          path: "/intentionDetail",
          name: "intentionDetail",
          component: () => import("@/views/home/intention/intentionDetail.vue"),
          meta: {
            title: "意向单详情",
          },
        },

        // 网站管理
        {
          path: "/websiteHome",
          name: "websiteHome",
          component: () => import("@/views/home/website/websiteHome.vue"),
          meta: {
            title: "网站首页",
          },
        },
        // album 网站公司相册
        {
          path: "/websiteAlbum",
          name: "websiteAlbum",
          component: () => import("@/views/home/website/websiteAlbum.vue"),
          meta: {
            title: "网站公司相册",
          },
        },
        // 相册管理
        {
          path: "/websiteAlbumManage",
          name: "websiteAlbumManage",
          component: () =>
            import("@/views/home/website/websiteAlbumManage.vue"),
          meta: {
            title: "网站公司相册",
          },
        },
        // 网站公告
        {
          path: "/websiteNotice",
          name: "websiteNotice",
          component: () => import("@/views/home/website/websiteNotice.vue"),
          meta: {
            title: "网站公告",
          },
        },
        // 发布公告
        {
          path: "/websiteNoticeAdd",
          name: "websiteNoticeAdd",
          component: () => import("@/views/home/website/websiteNoticeAdd.vue"),
          meta: {
            title: "网站公告",
          },
        },
        // 置顶记录
        {
          path: "/websiteTopping",
          name: "websiteTopping",
          component: () => import("@/views/home/website/websiteTopping.vue"),
          meta: {
            title: "置顶记录",
          },
        },
        //公司视频
        {
          path: "/websiteVideo",
          name: "websiteVideo",
          component: () => import("@/views/home/website/websiteVideo.vue"),
          meta: {
            title: "公司视频",
          },
        },
        //联系方式
        {
          path: "/websitePhone",
          name: "websitePhone",
          component: () => import("@/views/home/website/websitePhone.vue"),
          meta: {
            title: "联系方式",
          },
        },
      ],
    },

    // 登录
    {
      path: "/login",
      name: "Login",
      component: () => import("@/views/login/index.vue"),
      meta: {
        title: "登录",
      },
    },
    // 商城首页
    {
      path: "/purchase",
      name: "purchase",
      component: () => import("@/views/purchase/index.vue"),
      meta: {
        title: "首页",
      },
    },
    // 采购单
    {
      path: "/purchaseorder",
      name: "purchaseorder",
      component: () => import("@/views/purchaseorder/index.vue"),
      meta: {
        title: "采购单",
      },
    },
    // 采购信息
    {
      path: "/buying",
      name: "buying",
      component: () => import("@/views/buying/index.vue"),
      meta: {
        title: "采购信息",
      },
    },
    // 报价单
    {
      path: "/quotations",
      name: "quotations",
      component: () => import("@/views/quotations/index.vue"),
      meta: {
        title: "报价单",
      },
    },
    // 商品详情
    {
      path: "/character",
      name: "character",
      component: () => import("@/views/character/index.vue"),
      meta: {
        title: "商品详情",
      },
    },
    // 咨询单
    {
      path: "/advisory",
      name: "advisory",
      component: () => import("@/views/advisory/index.vue"),
      meta: {
        title: "咨询单",
      },
    },
  ],
});



export default router;
